Welcome, Guest. Please login or register.
Did you miss your activation email?
July 31, 2010, 11:36:49 am
advanced search




Pages: [1]
  Print  
Author Topic: [Committed] Arrow Getters in AxisRods  (Read 558 times)
sbook
Moderator
Sr. Member
*
Offline Offline

Posts: 875


Perpetually stating the obvious..


View Profile WWW
« on: December 28, 2009, 10:13:21 am »

Considering that one of the jobs of axis rods in a 3D application would be manipulating spaces by using them, the ability to get the individual arrows would seem like an obvious, unobtrusive addition Smiley

Code:
Index: src/com/jme/scene/shape/AxisRods.java
===================================================================
--- src/com/jme/scene/shape/AxisRods.java (revision 4779)
+++ src/com/jme/scene/shape/AxisRods.java (working copy)
@@ -45,7 +45,7 @@
 import com.jme.util.export.OutputCapsule;
 
 /**
- * Three coloured arrows, one pointing along each axis.
+ * Three colored arrows, one pointing along each axis.
  *
  * @author Joshua Slack
  * @version $Revision$, $Date$
@@ -169,4 +169,16 @@
         capsule.write(rightHanded, "rightHanded", true);
     }
 
+ public Arrow getxAxis() {
+ return xAxis;
+ }
+
+ public Arrow getyAxis() {
+ return yAxis;
+ }
+
+ public Arrow getzAxis() {
+ return zAxis;
+ }
+
 }

« Last Edit: December 31, 2009, 04:57:55 am by sbook » Logged

Quote from: viridia01
is there or are there any tutorial for md5 not biased to blender?
Quote from: dhdd
yes here it is:
 1. don't use MD5, it just doesn't work out in the end in this artist pipeline
InShadow
Jr. Member
**
Offline Offline

Posts: 76


View Profile
« Reply #1 on: December 29, 2009, 02:33:28 am »

Hmm, never really seen AxisRods lol, and they are exactly what I need. Any idea of how to render them always in top right corner of the screen (this means probably in ortho)?
Logged
sbook
Moderator
Sr. Member
*
Offline Offline

Posts: 875


Perpetually stating the obvious..


View Profile WWW
« Reply #2 on: December 29, 2009, 04:06:48 am »

Do you want them to be rotatable, kind of like they way you can see your orientation in Maya?  If so, then ortho isn't what you want...  You'd instead be looking to convert 2D screen coordinate into a Vector3f position with something like

Code:
Absolute Mouse am = new AbsoluteMouse("The Mouse", DisplaySystem.getDisplaySystem().getWidth(), DisplaySystem.getDisplaySystem().getHeight());
am.setLocalTranslation(new Vector3f(DisplaySystem.getDisplaySystem().getWidth() / 2, DisplaySystem.getDisplaySystem().getHeight() / 2, 0));
am.registerWithInputHandler(input);
Vector2f screenPos = new Vector2f();
// Get the position that the mouse is pointing to
screenPos.set(am.getHotSpotPosition().x, am.getHotSpotPosition().y);
Vector3f worldCoords = DisplaySystem.getDisplaySystem().getWorldCoordinates(screenPos, 0);
Logged

Quote from: viridia01
is there or are there any tutorial for md5 not biased to blender?
Quote from: dhdd
yes here it is:
 1. don't use MD5, it just doesn't work out in the end in this artist pipeline
InShadow
Jr. Member
**
Offline Offline

Posts: 76


View Profile
« Reply #3 on: December 29, 2009, 01:26:07 pm »

Actually I want them to be rotatable yes. Smiley
And kinda like Maya has axis rods in lower left corner, but I think this still should be in ortho, since its drawn on top of everything else...
Logged
Tags:
Pages: [1]
  Print  
 
Jump to: